import React, { Component } from 'react';
import { BrowserRouter, NavLink, Route } from 'react-router-dom';
import Home from './home';
import Other from './other';
import './index.css';
export default class index extends Component {
  render() {
    return (
      <div>
        <BrowserRouter>
          <nav>
            <NavLink to="/" exact activeClassName="link-action" >
              首页
            </NavLink>
            <NavLink to="/other" activeClassName="link-action">
              其他
            </NavLink>
          </nav>
          <main>
            <Route path="/" exact component={Home} />
            <Route path="/other" component={Other} />
          </main>
        </BrowserRouter>
      </div>
    );
  }
}
